#include <iostream>
#include <cassert>
using namespace std;

int factorial(int n)
{
    assert( n >= 1);
    int i = 1;
    int result = 1;
        
    while( n >= 1){
        result *= n--;
    }
    return result;
}


int main()
{
    cout << factorial(10) << endl;
    cout << factorial(4) << endl;
}
